<div id="directory" class="section">
<h1>Download RequireJS</h1>
<ul class="index mono">
    <li class="hbox"><a href="#latest">Latest Release</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1</span></li>
    <ul>
        <li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.1</span></li>
        <li class="hbox"><a href="#samplejquery">Sample RequireJS + jQuery 1.5.1 project</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.2</span></li>
        <li class="hbox"><a href="#node">RequireJS adapter for Node and Rhino</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.3</span></li>
        <li class="hbox"><a href="#optimizationtool">Optimization Tool / Full Source</a><span class="spacer boxFlex"></span><span class="sect">&sect; 1.4</span></li>
    </ul>
    <li class="hbox"><a href="#previous">Plugins</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2</span></li>
    <ul>
        <li class="hbox"><a href="#text">text</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2.1</span></li>
        <li class="hbox"><a href="#order">order</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2.2</span></li>
        <li class="hbox"><a href="#cs">cs (CoffeeScript)</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2.3</span></li>
        <li class="hbox"><a href="#i18n">i18n</a><span class="spacer boxFlex"></span><span class="sect">&sect; 2.4</span></li>
    </ul>
    <li class="hbox"><a href="#previous">Previous Releases</a><span class="spacer boxFlex"></span><span class="sect">&sect; 3</span></li>
</ul>

</div>

<div class="section">
<h2><a name="latest">Latest Release: 0.24.0</a><span class="sectionMark">&sect; 1</span></h2>

<ul>
<li>Support for IE 9. It has <a href="https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution">a non-conformant script loading behavior</a> that necessitated the change. It would be ideal if IE 9 would change the behavior to be conformant.</li>
<li>Changes to jQuery integration:
    <ul>
        <li>jQuery 1.5.1 included in sample project.</li>
        <li>No more bundled RequireJS and jQuery file. RequireJS includes special code to detect jQuery as a module, so the combined file is not necessary, and this approach makes it easier to swap in new versions of jQuery as they are released.</li>
        <li>Because of that change, the jQuery sample project using the new priority: config approach.</li>
    </ul>
<li>allplugins-require.js has been removed. Plugins are no longer bundled with require.js or in the sample jQuery project. There are separate download links to the existing plugins on the download page. Special treatment of these plugins has also been removed from the require.js source, so those plugins behave like any other loader plugin.</li>
<li>There is now a <a href="#cs">CoffeScript plugin</a>. It makes it easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino. This is the best way to do cross-environment, modular CoffeeScript.</li>
<li>Bug fixes.</li>
</ul>

<div class="subSection">
<h4 class="hbox">
<a name="requirejs">require.js</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/require.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/require.js">With Comments</a>
</h4>

<p>All you need to start using require.js in the browser.</p>
</div>

<div class="subSection">
<h4 class="hbox">
<a name="samplejquery">Sample RequireJS + jQuery 1.5.1 project</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/jquery-require-sample.zip">Download</a>
</h4>

<p>A zip file containing a sample project that uses jQuery and RequireJS.</p>
</div>

<div class="subSection">
<h4><a name="node">RequireJS adapter for Node and Rhino</a></h4>

<p><strong><a href="http://requirejs.org/docs/release/0.24.0/r.js">r.js</a></strong>: use this file if you want to code to the RequireJS module format in Node or Rhino.</p>

<p><strong>Use in Node</strong></p>

<p>Requires Node 0.4.0 or higher. The <a href="node.html">Node instructions</a> explain how to use it. It includes all the code needed for RequireJS to function with Node.</p>

<p><strong><a href="http://requirejs.org/docs/release/0.24.0/node/index.js">index.js</a></strong>: the standard HTTP server-based Hello World app for Node, but coded to work with the r.js adapter. Download it in the same directory as r.js and then run this command:</p>

<pre><code>node r.js index.js
</code></pre>

<p>Then you can go to http://127.0.0.1:8000/ and see "Hello World" printed after about 2 seconds.</p>

<p><strong>Use in Rhino</strong></p>

<p>The r.js adapter also runs under Rhino. Use it like so, where main.js is your application's top level file:</p>

<pre><code>java -jar path/to/rhino/js.jar r.js main.js
</code></pre>

</div>

<div class="subSection">
<h4 class="hbox">
<a name="optimizationtool">Optimization Tool / Full Source</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/requirejs-0.24.0.zip">Download</a></h4>

<p>A zip file that is the optimization tool for RequireJS. It also includes the full source for RequireJS.</p>
</div>

</div>


<div class="section">
<h2><a name="plugins">Plugins</a><span class="sectionMark">&sect; 2</span></h2>

<p>These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.</p>

<div class="subSection">
<h4 class="hbox">
<a name="text">text</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/text.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/text.js">With Comments</a>
</h4>
<p><a href="api.html#text">Load text files and treat them as dependencies</a>. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.</p>
</div>

<div class="subSection">
<h4 class="hbox">
<a name="order">order</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/order.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/order.js">With Comments</a>
</h4>
<p><a href="api.html#order">Load script in the order specified in the dependency array</a>. Useful for existing scripts that have implied dependencies instead of calling define() to create modular code.</p>
</div>


<div class="subSection">
<h4 class="hbox">
<a name="cs">cs (CoffeeScript)</a>
<span class="boxFlex"></span>
<a class="download" href="https://github.com/jrburke/require-cs/raw/0.1.0/cs.js">With Comments</a>
</h4>
<p>Load files written in CoffeeScript. Includes a version of CoffeeScript, only this one file is needed. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the <a href="#node">RequireJS adapter</a>. This is the best way to do cross-environment, modular CoffeeScript. <a href="https://github.com/jrburke/require-cs/">The project home</a> has more information on how to use it.</p>
</div>


<div class="subSection">
<h4 class="hbox">
<a name="i18n">i18n</a>
<span class="boxFlex"></span>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/minified/i18n.js">Minified</a>
<a class="download" href="http://requirejs.org/docs/release/0.24.0/comments/i18n.js">With Comments</a>
</h4>
<p><a href="api.html#i18n">Load string bundles</a> used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.</p>
</div>

</div>

<div class="section">
<h2><a name="previous">Previous releases</a><span class="sectionMark">&sect; 3</span></h2>

<h3>0.23.0</h3>

<ul>
<li>Calculation of baseUrl changed. This affects the jQuery Sample project, which has been updated in this release. Instead of baseUrl defaulting to the directory containing require.js, it now defaults to the HTML page's directory. If data-main is used, then the directory used in that attribute becomes the baseUrl. Explicitly setting baseUrl in the configuration overrides the aforementioned defaults.</li>
<li>The RequireJS optimizer now uses Node by default. So, build.sh/.bat are now Node-based. Java/Rhino is still supported via the buildj.sh/.bat scripts.</li>
<li><a href="https://github.com/mishoo/UglifyJS">UglifyJS</a> is now the default minifier for the optimizer, since it works both in Node and in Rhino. However, UglifyJS does not do if/else dead code removal, so the <a href="optimization.html#hasjs">has() optimization</a> is not that great when using UglifyJS. Hopefully this will change in a future version of UglifyJS. If you want the full has() optimization, Closure Compiler can still be used, either by using buildj.sh to use Java/Rhino to do the optimization work, or by running Closure Compiler yourself after the optimizer runs.</li>
<li>The behavior of the Node adapter, r.js has changed. It now assumes that any module found via the RequireJS config uses define() to define modules. If a module is not found via the RequireJS path config, r.js uses Node's native require() function and its pathing rules
to find the module. This allows the most compatible use of npm-installed modules. However it means you <strong>should not</strong> include RequireJS configuration for npm-installed modules/packages.</li>
<li>The r.js adapter now works in Node and Rhino.</li>
<li>The config option, <strong>baseUrlMatch</strong> has been removed, since the data-main baseUrl rule mentioned above removes the need for it.</li>
<li>Some important fixes around loader plugins: a fix to allow multiple modules to use the same plugin resources as a common dependency, and to allow loader plugins that use a define() function callback to work in the optimizer.</li>
<li>A fix for the use of jQuery's readyWait capability when jQuery is detected and used as a module.</li>
<li>Some directory shuffling related to making the rhino and node adapters the same for use in command line tools and in the r.js adapter.</li>
</ul>

<h3>0.22.0</h3>

<ul>
<li>A <a href="plugins.html">full plugin API</a> that supports also including plugin loaded artifacts in optimized builds.</li>
<li><a href="node.html">Robust Node support</a>: now can use npm-installed modules, .node add-ons, and modules on require.paths.</li>
<li>Support for <a href="optimization.html#hasjs">has.js optimizations</a> in the optimizer, including dead code branch removal via Closure Compiler.</a>
<li><a href="https://github.com/jrburke/requirejs/commits/">Bug Fixes from 2010-12-21 through 2011-01-05</a>.</li>
</ul>

<h3>0.2.1 (should have been 0.21.0)</h3>

<ul>
<li>[Bug Fixes from 2010-12-16 through 2010-12-19](https://github.com/jrburke/requirejs/commits/)</li>
</ul>

<h3>0.2.0 (should have been 0.20.0)</h3>

<ul>
<li>Refactored core.</li>
<li>New loader plugin API support.</li>
<li>Improved Rhino and Node adapters</li>
<li>Bug fixes around loader plugins and the optimizer.</li>
<li>require.modify removed.</li>
<li>Removed Transport D files.</li>
</ul>

<h3>0.15.0</h3>

<ul>
<li>The bundled jQuery options now use jQuery 1.4.4.</li>
<li>The jQuery sample project now includes the ability to use RequireJS plugins.</li>
<li>The jsonp! plugin has been removed, since, thanks to work by Kris Zyp, the core loader now supports loading JSONP dependencies by default. The <a href="http://requirejs.org/docs/api.html#jsonp">JSONP docs</a> have been updated accordingly.</li>
<li>The optimizer can now be run from any directory, not just the directory with the build profile.</li>
<li>r.js Node adapter is more robust, and it can handle using more Node-written modules by default now. Thanks to Francois Laberge for a great test case application that lead to improving the robustness of r.js.</li>
<li>Initial support for PS3 Netfront browser. Thanks to Chris Warren for investigating the load behavior of the browser. Not all tests pass, but the basic ones do.</li>
<li>Miscellaneous fixes, some listed in <a href="https://github.com/jrburke/requirejs/issues/closed#sort=updated">the issue tracker</a>.</li>
</ul>

<h3>0.14.5</h3>

<ul>
<li><a href="http://github.com/jrburke/requirejs/commit/88847fe53ab2e97e7ba7ec8f2afc056fb29b0a70">Fix bug</a> where scripts were not loaded from the correct path. Did not affect RequireJS+jQuery builds, but affected other builds. If you do not use a RequireJS+jQuery build, then it is strongly recommended that you upgrade from 0.14.4 to 0.14.5.</li>
<li>Added an urlArgs <a href="http://requirejs.org/docs/api.html#config">config option</a> to allow for cache busting when servers/browser misbehave during development.</li>
</ul>

<h3>0.14.4</h3>

<ul>
<li>Support jQuery 1.4.3. The bundled RequireJS+jQuery bundle now uses RequireJS 1.4.3, and it is now possible to load jQuery directly from a CDN.</li>
<li>Remove the Transport D pre-built option from the download page. The Transport D adapter is still in the source bundler though.</li>
</ul>

<h3>0.14.3</h3>

<ul>
<li>Support for <strong>define()</strong>. It works the same as <strong>require.def()</strong>. It is supported in order to conform with the <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">Asynchronous Module Proposal</a>. require.def will continue to work, but you are encouraged to gradually migrate to define() for better compatibly with other Async Module loaders.</li>
<li>text! plugin now works in Node.</li>
<li><em>_dirname and _</em>filename support in the r.js Node adapter.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/79188c726f90aefa34a16435e929a7bb98098358">Bug fix for priority option</a>.</li>
<li>GPL license option removed: project is now just MIT and new BSD dual-licensed, since the new BSD license is compatible with the GPL.</li>
</ul>

<h3>0.14.2</h3>

<ul>
<li>Bug fixes:
<ul>
<li><a href="http://github.com/jrburke/requirejs/commit/079e8b1e0abd4b77f0cd898c4bd77f24581942f5">Fix issue with "module" dependency</a> not correctly assigning exported value if it is <em>not</em> listed as the last dependency.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/e89c6c1523ac59e7303407d506f8e2ce75cdeb31">Fix "packages" config option</a>. Its behavior was fixed to match the docs.</li>
<li><a href="http://github.com/jrburke/requirejs/commit/416f24a6f556c0d96f9fd9d4146a9ecfcd337668">Fix module-to-name resolution</a> to account for package mappings.</li>
</ul></li>
</ul>

<h3>0.14.1</h3>

<ul>
<li>Bug fixes:
<ul>
<li><a href="http://github.com/jrburke/requirejs/issues#issue/13">Issue 13</a>: convertCommonJs.sh failed copying non-JS files)</li>
<li><a href="http://github.com/jrburke/requirejs/issues#issue/14">Issue 14</a>: exports not available when no require calls)</li>
<li><a href="http://github.com/jrburke/requirejs/commit/c5500f135bdb006cd963d245d9d30519a7cb3945">Fix for deeply cyclic dependencies</a>.</li>
</ul></li>
</ul>

<h3>0.14.0</h3>

<ul>
<li><a href="http://tagneto.blogspot.com/2010/09/anonymous-module-support-in-requirejs.html">Anonymous modules support</a>, <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">CommonJS Asynchronous Module proposal</a> supported.</li>
<li><a href="api.html#packages">Loading modules from CommonJS packages</a>.</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from (see commits starting from 2010-09-15 through 2010-09-26))</li>
</ul>

<h3>0.13.0</h3>

<ul>
<li>module.setExports and module.exports are now supported for converted CommonJS modules.</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from 2010-07-05 through 2010-09-10), in particular <a href="http://github.com/jrburke/requirejs/commit/d12935bac803bcd5981652584102282b69fdd7b1">a fix to throw when a timeout for a script occurs</a>. That fix should make debugging issues much easier.</li>
</ul>

<h3>0.12.0</h3>

<ul>
<li>A new plugin: <a href="api.html#order">order</a> -- it ensures that scripts are fetched asynchronously and in parallel, but executed in the order specified in the call to require(). Ideal for traditional browser scripts that do not participate in modules defined via calls to require.def().</li>
<li><a href="api.html#webworker">Web Worker support</a>. RequireJS can be used in a web worker.</li>
<li>Multiple module names can now be mapped via the <strong>paths</strong> config option to the same URL, and that URL will only be fetched once.</li>
<li>Added Firefox 2 to supported browsers. Safari 3.2 also works with require().</li>
<li><a href="http://github.com/jrburke/requirejs/commits/master">Bug fixes</a> (see commits starting from 2010-05-25 through 2010-07-04), in particular <a href="http://github.com/jrburke/requirejs/commit/c3ae5e96f0aadd549f30a4019fe021c057e76f50">a fix for the priority config</a>, and <a href="http://github.com/jrburke/requirejs/commit/98d418fe4e4503575cca18b73260c0ab74f365fc">improved support in IE with a bad base tag</a>.</li>
</ul>
</div>
